﻿using System;
using UnityEngine;

// Token: 0x02000223 RID: 547
public class BloodDetectors : MonoBehaviour
{
	// Token: 0x06000B6B RID: 2923 RVA: 0x0005FB88 File Offset: 0x0005DD88
	private void FixedUpdate()
	{
		base.transform.position = this.targetTran.position;
		base.transform.eulerAngles = this.targetTran.eulerAngles;
	}

	// Token: 0x06000B6C RID: 2924 RVA: 0x0005FBB8 File Offset: 0x0005DDB8
	private void OnTriggerEnter(Collider other)
	{
		if (other.gameObject.layer == Layers.gtsBodyLayer && !this.isDestroyed)
		{
			if (this.tIdNumber == 1)
			{
				this.parentScript.t1 = null;
			}
			if (this.tIdNumber == 2)
			{
				this.parentScript.t2 = null;
			}
			if (this.tIdNumber == 3)
			{
				this.parentScript.t3 = null;
			}
			if (this.tIdNumber == 4)
			{
				this.parentScript.t4 = null;
			}
			if (this.tIdNumber == 0)
			{
				Debug.Log("NO ID FOR TRIGGER");
			}
			this.isDestroyed = true;
			UnityEngine.Object.Destroy(base.gameObject);
		}
	}

	// Token: 0x06000B6D RID: 2925 RVA: 0x0005FC6C File Offset: 0x0005DE6C
	private void OnTriggerStay(Collider other)
	{
		if (other.gameObject.layer == Layers.gtsBodyLayer && !this.isDestroyed)
		{
			if (this.tIdNumber == 1)
			{
				this.parentScript.t1 = null;
			}
			if (this.tIdNumber == 2)
			{
				this.parentScript.t2 = null;
			}
			if (this.tIdNumber == 3)
			{
				this.parentScript.t3 = null;
			}
			if (this.tIdNumber == 4)
			{
				this.parentScript.t4 = null;
			}
			if (this.tIdNumber == 0)
			{
				Debug.Log("NO ID FOR TRIGGER");
			}
			this.isDestroyed = true;
			UnityEngine.Object.Destroy(base.gameObject);
		}
	}

	// Token: 0x04001080 RID: 4224
	public Transform targetTran;

	// Token: 0x04001081 RID: 4225
	public BloodBounds parentScript;

	// Token: 0x04001082 RID: 4226
	public int tIdNumber;

	// Token: 0x04001083 RID: 4227
	private bool isDestroyed;
}
